var UI = {

	// // 提示弹窗
	// alter:function(){



	// }


	// 登陆 注册提交弹窗
	open:function(obj){

		var title = (obj.title == undefined || obj == undefined) ? '系统消息' : obj.title;
		var url   = (obj.url   == undefined || obj == undefined) ? '' : obj.url;
		var width = (obj.width   == undefined || obj == undefined) ? '320' : obj.width;
		var height = (obj.height   == undefined || obj == undefined) ? '450' : obj.height;
		var html  = '<div class="login_box_c">'+
						'<div id="login_title" class="title"> <span id="remove">X</span>'+
							'<h3>'+ title +'</h3>'+
						'</div>'+
						'<div class="middle">'+
							'<iframe src="'+ url +'" frameborder="0" class="myIframe"></iframe>'+
						'</div></div>';

	        let div = document.createElement('div');
	        div.setAttribute('class','login_box');
	        div.style.width = width + 'px';
	        div.style.height = height + 'px';
	        div.innerHTML = html;
	        document.getElementsByTagName('body')[0].appendChild(div);
	       	document.getElementById('background_box').style.display = 'block';
	       	document.getElementsByClassName('myIframe')[0].style.height = height - 170 + 'px';

	  	document.getElementById('remove').onclick = loginShow;
	  	document.getElementById('background_box').onclick = loginShow;

	  	function loginShow(){

	  		document.getElementsByTagName('body')[0].removeChild(div);
	       	document.getElementById('background_box').style.display = 'none';
	  	}

	},

	userInter : function(obj){

		var url = obj.url == undefined || obj == undefined ? '' : obj.url,
			html = '<iframe src="'+ url +'" frameborder="0" class="myIframe"></iframe>',
			nav = document.getElementById('nav_right');
			
		var div = document.createElement('div');
		div.setAttribute('class','Inter_center');
		div.innerHTML = html;

		if(nav.hasChildNodes()){
			nav.removeChild(document.getElementsByClassName('Inter_center')[0]);
		}
			
		nav.appendChild(div);
	}

}